package com.mall.serviceImpl;

import com.mall.bean.SystemRole;
import com.mall.mapper.SystemRoleMapper;
import com.mall.service.SystemRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.interceptor.AroundInvoke;
import java.util.List;

/**
 * @PageName com.mall.serviceImpl
 * @Description 角色管理service实现
 * @Author 何全裕
 * @Create 2017-09-03 20:05
 * @Version 1.0
 **/
@Service("sysRoleService")
public class SystemRoleServiceImpl implements SystemRoleService {

    @Autowired
    private SystemRoleMapper systemRoleMapper;
    /**
     * 查找角色列表
     * @return
     */
    public List<SystemRole> getSystemRoleList() {
        return systemRoleMapper.getSystemRoleList();
    }

    public void insertRole(SystemRole role) {
        systemRoleMapper.insertRole(role);
    }

    public void deleteAllRole(String[] ids) {
        systemRoleMapper.deleteAllRole(ids);
    }

    public void deleteRole(String id) {
        systemRoleMapper.deleteRole(id);
    }

    public SystemRole getSystemRoleById(String id) {
       return systemRoleMapper.getSystemRoleById(id);
    }

    public void updateSystemRole(SystemRole role) {
        systemRoleMapper.updateSystemRole(role);
    }


}
